import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Antd from 'ant-design-vue'
import store from './store'
import 'ant-design-vue/dist/antd.less'
import axios from 'axios'
import weixinJsSdk from 'weixin-js-sdk'


axios.interceptors.request.use(
    config => {
        const token =  sessionStorage.getItem("token");
        token && (config.headers.Authorization = token);
        return config;
    },
    error => {
        return Promise.error(error);
    }
)


const app = createApp(App)
// app.config.globalProperties.$request = Myrequest
app.config.globalProperties.$wx = weixinJsSdk
app.use(router).use(Antd).use(store).mount('#app')

